package com.financial.service.yspay.controller;

import com.financial.service.yspay.service.FinancialYsPayWeChatPayQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author Vincentxin
 * @Date 2019-06-28
 */
@RestController
@RequestMapping("/ysWeChatPayQuery")
public class FinancialYsPayWeChatPayQueryController {
    @Autowired
    private FinancialYsPayWeChatPayQueryService ysPayQueryService;

    /**
     * 通过out_trade_no或者trade_no 查询支付信息
     *
     * @param reqparam
     * @return
     */
    @PostMapping("/ysPayQuery")
    public Map<String, Object> ysPayQuery(@RequestParam Map<String, String> reqparam) {
        return ysPayQueryService.ysPayQuery(reqparam);
    }

}
